import { Component } from "cc";
import { StateMachine } from "./StateMachine";
import { EntityTypeEnum, StateTypeEnum } from "../Common";

export abstract class EntityManager extends Component {

    type: EntityTypeEnum
    fsm: StateMachine
    private _state: StateTypeEnum

    get state() {
        return this._state
    }

    set state(arg) {
        this._state = arg
        this.fsm.setParams(this._state, true)
    }

    abstract init(...arg: any[]): void
}